//-------------------------------------------------------------------------------------------------
// author zhangwei on 2015.08.10
// modified by zhangwei on 2015.08.10
// - Released ver v1. This version is the clone from: https://github.com/TahaSh/Tasks-App-With-VueJS
//   And there's a good article about it: http://taha-sh.com/blog/many-js-frameworks-but-vuejs-is-different 
// modified by zhangwei on 2015.08.10
// - Released ver 2. This is a readonly list.
// modified by zhangwei on 2015.08.10
// - Released ver 3. Add task delete support.
//
// Reference
// - http://taha-sh.com/blog/many-js-frameworks-but-vuejs-is-different 
//-------------------------------------------------------------------------------------------------

new Vue({
    el: '#app',
	
	data: {
        tasks: [
            { title: 'Go to grocery store', completed: false },
            { title: 'Do the dishes', completed: false },
            { title: 'Call John', completed: false }
        ]
    },
	
	methods: {
		removeTask: function(task) {
			this.tasks.$remove(task);
		}
	}

});
